<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> 
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %> 
<%@ taglib uri="/WEB-INF/tld/sys.tld" prefix="sys" %>
<!DOCTYPE html>
<html lang="zh-CN" >
<head>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>支付表列表</title>
<style type="text/css">
    .searchArea .fieldBox .label{width: 80px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
</style>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
<div class="Wrapper">
<div class="searchArea">
</div>
<div id="ligergrid1" class="sq-grid" style="height: 372px;"></div>

<script type="text/javascript">
	$(function () {
		initGrid();
	});


	var grid = null;
	var applyId = $("#applyId").val();
	var fncCrdnlt = '';
	var stdt = '';
	var eddt = '';
	var pianflag=$('#pianflag').val();//平安信托标示
	//初始化数据
	function initData(){
	}
	
	//初始化列表
	function initGrid() {
		$("#searchBar").ligerForm({validate: true});
		var _url = '<%=path%>/project/prjprdpayschm/getPrjPrdPaySchMList.do?prjId=${prjId}&lsCntNo=${contractNo}';
    	$("#ligergrid1").ligerGrid({
    		url : _url,
    		method : 'get',
    		
        	columns: [
	            
	            { display: '支付表编号', name: 'paySchNo',
	            	
	              render: function (rowdata, rowindex, value, column) { 
	            		var h = '';
	            				h='<a href="javascript:detailBtn(';
	 	                        h+="'"+rowdata.prjPrdDtlId+"',";
	 	                        h+="'"+rowdata.id+"',";
	 	                        h+="'"+rowdata.prjPrdId+"',";
	 	                        h+="'"+rowdata.prjId+"'";
	 	                        h+=')">'+value+'</a>'
	            			
	                        return h;
	            		}},
	             { display: '合同金额', name: 'contAmt'},
	            { display: '租赁期数', name: 'lsPd'},
	            { display: '支付方式', name: 'payWayCdNm' }
	        ],
	       
	        pageSize:10, 
	        root:'rows',
	        record:'total',
	        hideLoadButton : true,
	        width: 'auto',
	        height:'auto',
	        heightDiff:-2,
	        checkbox:false,
	        usePagerOnLessPagesize: false,
	        rownumbers:true
    	});
	    grid = liger.get("ligergrid1");
	    grid.setHeight(300);
	}
	
	
	
	function iframeResize () {
	    if (parent.mainApp) {
	        parent.mainApp.parentTab.onResize();
	    };
	}
	//格式化时间
	function renderDate(rowdata, index, value){
		var dateStr = "";
		if(null != value){
			var date = new Date(value);
			dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DD);
		}
		return dateStr;
	}
   function detailBtn(prjPrdDtlId,id,prjPrdId,prjId){
		var editFlag = true;
		Add_navTab('tab_prj_quat_prps'+id,'查看支付表','<%=path%>/project/prjprdpayschm/toAddPage.do?prjId='+prjId+'&&id='+id+'&&prjPrdDtlId='+prjPrdDtlId+'&&prjPrdId='+prjPrdId+'&&detailFlag='+editFlag+'&&pian=101');
   }
   function payDetail(id){//add by gengchunlan 20190121
		var payDetailUrl = '<%=path%>/project/prjprdpayschm/toPrjPrdPaySchMDetailPage.do?id='+id;
		Add_navTab('tab_prj_quat_prps_pay'+id,'查看还款情况',payDetailUrl);
	}
   function detailPrjBtn(prjId){
   		Add_navTab('tab_project_detail'+prjId,'项目详情','<%=path%>/project/prjbscinfo/toProtBacInfoDetailPage.do?pianflag=101&id='+prjId);
   }
	
</script>
</body>
</html>
